#ifndef PRODUCT_H_
#define PRODUCT_H_

#include <string>

using namespace std;

struct Product {
private:
    //constants

    // private data
    int prod_id;
    int cat_id;
    string prod_name;
    double prod_price;


public:
    //default constructor	-- RT
    Product() : prod_id(0), cat_id(0), prod_name(""), prod_price(0) {
    }
    
    // constructors
    Product(int prods_id, int cate_id, string prods_name, double prods_price)
    : prod_id(prods_id), cat_id(cate_id), prod_name(prods_name), prod_price(prods_price) {
    }

    // utility functions
    string display() const {    // RT
        ostringstream oss;
        oss << prod_id << "\t" << cat_id << "\t" << prod_name << "\t" << prod_price;
        return oss.str();
    }

	static string display_header() {			// RA A.2
		return "ID\tCategory ID\tName\tPrice";	// RA A.2
	}											// RA A.2
    
    // getter
    int get_prod_id() const { // RA S2
        return prod_id;
    }
    
    int get_cat_id() const { // RA S2
        return cat_id;
    }
    
    string get_prod_name() const { // RA S2
        return prod_name;
    }
    
    double get_prod_price() const { // RA S2
        return prod_price;
    }
	void set_cat_id(int newCatID){	// RT C1
		cat_id = newCatID;
	}
	void set_price(double newPrice){	// RT C1
		prod_price = newPrice;
	}	
};

#endif //PRODUCT_H_
